package com.xlhj.boot.jmeter.controller;

import com.xlhj.boot.jmeter.common.ResultData;
import com.xlhj.boot.jmeter.entity.SysUserInfo;
import com.xlhj.boot.jmeter.service.SysUserInfoService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: caijliu
 * @Date: 23/11/2021 16:38
 * @Description TODO
 * @Vsersion: 0.0.1
 */
@RestController
@RequestMapping("/user")
@RequiredArgsConstructor
public class UserController {

    private final SysUserInfoService userInfoService;

    @GetMapping("/getUserInfoById")
    public ResultData getUserInfoById(@RequestParam Long id) {
        SysUserInfo userInfo = userInfoService.getById(id);
        return ResultData.success().data(userInfo);
    }
}
